1. Field of the Invention
The present invention relates to a method, system, and article of manufacture for converting image data in an input color space to an output color space in a transform domain.
2. Description of the Related Art
Colors received as input to render at an output device are mapped from one color space to a color space used by the device rendering the output color value. Color conversion is performed if the output device, e.g., video controller, printer, storage, etc. processes data to render in a different format than the input color value. For instance, a color in an RGB (Red, Green and Blue) color space may be mapped to a CMYK (Cyan, Magenta, Yellow and Black), and vice versa. Further, many printers only have black ink, so their output color space comprises halftone color values. If the input color value is in a CMYK color space, then the CMYK color must be converted to the halftone or black (K) color value for rendering by the “black and white” printer.
If the image data in the input color space to convert is compressed, such as by a Joint Photographic Experts Group (JPEG) compression technique, then blocks of the compressed image are first decompressed by entropy decoding and dequantizing the blocks to obtain decompressed blocks of Discrete Cosine Transform (DCT) coefficients in the transform domain. An inverse transform is then performed on these blocks of DCT coefficients in the transform domain to produce the image pixels in the real domain in the input color space. The pixels in the real domain are then converted using a color conversion lookup table or other technique to uncompressed image data in the real domain in the output color space. This converted image data in the output color space may then be transformed to the transform domain and compressed by performing a forward DCT transform on the image data, quantizing the resulting DC and AC values of the image blocks, and then entropy encoding the quantized blocks of image data to produce compressed image data in the output color space.
There is a need in the art to provide improved techniques to convert compressed image data in an input color space to image data in an output color space.